import { Snowflake } from "../utils/Snowflake";
import { MessageAttachmentDto } from "./MessageAttachment";
import { UserDto } from "./User";
import { MessageEmbedDto } from "./MessageEmbed";


/*
    {
        "type":0,
        "tts":false,
        "timestamp":"2023-11-19T14:20:15.904000+00:00",
        "referenced_message":null,
        "pinned":false,
        "nonce":"1175802724273356800",
        "mentions":[],
        "mention_roles":[],
        "mention_everyone":false,
        "id":"1175802728799277086",
        "flags":0,
        "embeds":[],
        "edited_timestamp":null,
        "content":"события теперь надо поглядеть",
        "components":[],
        "channel_id":"136891423655067648",
        "author":{
            "username":"timosh",
            "public_flags":0,
            "premium_type":0,
            "id":"118483467766857735",
            "global_name":"Timosh",
            "discriminator":"0",
            "avatar_decoration_data":null,
            "avatar":"643fbd518376a074858bcf41a1c36751"
        },
        "attachments":[]
    }
*/


/*

    {
        "id":"1175741715840237648",
        "type":0,
        "content":"\u0422\u0443\u043f\u043e \u041d\u0438\u043a\u0438\u0442\u043e\u0441 \u0441\u0438\u0434\u0438\u0442 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.",
        "channel_id":"136891423655067648",
        "author":{
            "id":"136890167159029760",
            "username":"glurio",
            "avatar":"3e9e1f4e05bd8e3b92235e3d3f2febe2",
            "discriminator":"0",
            "public_flags":0,
            "premium_type":0,
            "flags":0,
            "banner":null,
            "accent_color":null,
            "global_name":"Glurio",
            "avatar_decoration_data":null,
            "banner_color":null
        },
        "attachments":[],
        "embeds":[],
        "mentions":[],
        "mention_roles":[],
        "pinned":false,
        "mention_everyone":false,
        "tts":false,
        "timestamp":"2023-11-19T10:17:49.281000+00:00",
        "edited_timestamp":null,
        "flags":0,
        "components":[]
    }

    {
        "type":0,
        "tts":false,
        "timestamp":"2023-11-19T12:24:20.447000+00:00",
        "referenced_message":null,
        "pinned":false,
        "nonce":"1175773546698244096",
        "mentions":[],
        "mention_roles":[],
        "mention_everyone":false,
        "id":"1175773555498164224",
        "flags":0,
        "embeds":[],
        "edited_timestamp":null,
        "content":"",
        "components":[],
        "channel_id":"136891423655067648",
        "author":{
            "username":"timosh",
            "public_flags":0,
            "premium_type":0,
            "id":"118483467766857735",
            "global_name":"Timosh",
            "discriminator":"0",
            "avatar_decoration_data":null,
            "avatar":"643fbd518376a074858bcf41a1c36751"
        },
        "attachments":[
            {
                "width":361,
                "url":"https://cdn.discordapp.com/attachments/136891423655067648/1175773555217150042/image.png?",
                "size":117481,
                "proxy_url":"https://media.discordapp.net/attachments/136891423655067648/1175773555217150042/image.png?",
                "placeholder_version":1,
                "placeholder":"zvcJBACJ93dniIh3h4isgJY5CQ==",
                "id":"1175773555217150042",
                "height":639,
                "filename":"image.png",
                "content_type":"image/png"
            }
        ]
    }
*/

export interface MessageDto {
    id: Snowflake
    channel_id: Snowflake
    guild_id?: Snowflake
    author: UserDto
    content: string
    timestamp: string
    edited_timestamp: string | null
    mentions: UserDto[]
    embeds: MessageEmbedDto[]
    attachments: MessageAttachmentDto[]
}